﻿@model Itfort.Web.PageResult
@{
	ViewBag.Title = "设置邮箱";
	Layout = "~/Views/Shared/_Layout_Setting.cshtml";
}

<div class="setting-wapper">
	<h2 class="bb">设置一个常用邮箱，方便以后登录、参加活动、找回密码</h2>
	<div class="setting-form">
		@using (Html.BeginForm("InitFirst", "AccountInfo"))
  {
	  if (Model.Status == Itfort.Web.ResultStatus.Failure)
	  {
			<div>
				@Model.FailureMessage
			</div>
	  }
			<table class="form">
				<tr>
					<td>邮箱：</td>
					<td>
						<p>
							@Html.TextBox("email", null, new { size = 30 })
						</p>

					</td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>
						<input type="submit" value="下一步" /></td>
				</tr>
			</table>
  }
	</div>
</div>


@section BottomScripts
	{
	<script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.10.0/jquery.validate.min.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(function () {
			$("form").validate({
				rules: {
					email: {
						required: true,
						email: true
					}
				},
				messages: {
					email: {
						required: "请输入一个电子邮箱",
						email: "请输入一个正确的电子邮箱"
					}
				},
				errorPlacement: function (error, element) {
					error.appendTo(element.parent().parent());
				}
			});
		});
	</script>
}

